//
//  StuffTableViewCell.m
//  Menu
//
//  Created by YouLu on 15/7/4.
//  Copyright (c) 2015年 lijiangang. All rights reserved.
//

#import "StuffTableViewCell.h"

@implementation StuffTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        [self createSubViews];
    }
    return self;
}
-(void)createSubViews
{
    
    self.stuffImageView = [[UIImageView alloc] initWithFrame:CGRectMake(40*WIDTH, 10*HEIGHT, 295*WIDTH, 190*HEIGHT)];
    [self.contentView addSubview:self.stuffImageView];
    [_stuffImageView release];
    
    self.seasoningLabel = [[UILabel alloc] initWithFrame:CGRectMake(10*WIDTH, 10*HEIGHT, 295*WIDTH, 30*HEIGHT)];
    self.seasoningLabel.font = [UIFont systemFontOfSize:15];
    [self.stuffImageView addSubview:self.seasoningLabel];
    [_seasoningLabel release];

}
-(void)setPicUrl:(NSString *)picUrl
{
    if (_picUrl != picUrl) {
        [_picUrl release];
        _picUrl = [picUrl retain];
        
    }
    [self.stuffImageView sd_setImageWithURL:[NSURL URLWithString:self.picUrl]];
}
-(void)setNameStr:(NSString *)nameStr
{
    if (_nameStr != nameStr) {
        [_nameStr release];
        _nameStr = [nameStr retain];
    }
    self.seasoningLabel.text = self.nameStr;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
